#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START dbus
# depends: systemd
# depends: cross-pkg-config

reset_mtime dbus dbus/configure.ac
mkdir -p build/dbus
cd build/dbus
../../dbus/configure \
	${CONFIGURE_ARGS} \
	--disable-doxygen-docs \
	--disable-xml-docs \
	--with-console-auth-dir=/run/console \
	--with-system-pid-file=/run/dbus/pid \
	--with-system-socket=/run/dbus/system_bus_socket \
	--enable-systemd \
	--enable-user-session \
	--libexecdir=$prefix/lib/dbus-1 \
	--with-systemdsystemunitdir=$prefix/lib/systemd/system \
	--with-systemduserunitdir=$prefix/lib/systemd/user \
	--disable-selinux \
	--disable-tests \
	--disable-asserts \
	${AUTOCRAP_KLUDGE}

cd ../..
make_build build/dbus
mkdir -p -m755 "${stage}/var/lib/dbus"
ln -sfv /etc/machine-id "${stage}/var/lib/dbus/machine-id"

# RECIPE END dbus
